package com.thomasbrault.utils {
	import flash.utils.getDefinitionByName;	/**
	 * @author thomas
	 */
	public class Library 	{				private static var _resources:Object;				public static function getItem($id:String) : *        {        	return _resources[$id];        }                public static function addItem($item : *, $id:String) : void        {			if ( _resources == null ) _resources = new Object();			_resources[$id] = $item;        }        		public static function removeItem($id:String ) : void        {			if ( _resources == null ) _resources = new Object();			_resources[$id] = null;        }                public static function isAvaibleId ( $id : String ) : Boolean        {        	return (_resources==null|| _resources[$id] == null ) ? true : false;         }                public static function getInstanceFromDefinition ( $definition : String ) : Object        {        	var c : Class = getDefinitionByName($definition) as Class;        	return new c();        }
	}
}
